<template>
    <view class="big_head_boxs" :style="{ marginBottom: mrbot + 'rpx' }">
       <!-- #ifdef MP-WEIXIN -->
       <view class="bot_zhuyao_box">
            <view class="left_back_box" @click="goBack">
                <image :src="backImg" mode="scaleToFill" />
            </view>
            <view class="center_text_box" @click="tiaozhuan">{{ headCentext || '' }}</view>
            <view class="right_text_box"  @click="tiaozhuan">{{ rightText || '' }}</view>
        </view>
       <!-- #endif -->
    </view>
</template>
<script>
export default {
    props: {
        headCentext: {//页面标题
            type: String,
            defalut: ''
        },
        rightText: {
            trpe: String,
            defalut: ''
        }, 
        mrbot: {//下外边距
            type: String,
            default: ''
        },
        backImg: {
            type: String,
            default: 'https://morgan.dingxians.cn/static/userpic/13.png'
        }
    },
    data() {
        return {
        }
    },
    methods: {
        tiaozhuan() {
            this.$emit('rightBtn')
        },
        goBack(){
            if (uni.getStorageSync('open') == 1) {
                uni.switchTab({
                    url: '/pages/index/index',
                })
            }else{
                this.$goBack()
            }
        }
    }
}
</script>
<style lang="scss" scoped>
.big_head_boxs {
    width: 100%;
    height: 193rpx;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;

    .bot_zhuyao_box {
        width: 100%;
        height: 121rpx;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 30rpx;
        position: relative;

        .left_back_box {
            width: 100rpx;
            height: 121rpx;
            // background-color: #fff;

            image {
                width: 100rpx;
                height: 121rpx;
            }
        }

        .center_text_box {
            width: 400rpx;
            height: 34rpx;
            font-family: PingFang SC;
            font-weight: bold;
            font-size: 36rpx;
            text-align: center;
            color: #FFFFFF;
            line-height: 34rpx;
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }

        .right_text_box {

            height: 34rpx;
            font-family: PingFang SC;
            font-weight: bold;
            font-size: 28rpx;
            color: #FFFFFF;
            line-height: 34rpx;
        }
    }
}
</style>